<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>

<c:set var="contextRootPath" value="${pageContext.request.contextPath}" />
<c:if test="${pageContext.request.contextPath == '/'}">
	<c:set var="contextRootPath" value="" />
</c:if>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Thrift测试工具</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="${contextRootPath}/resource/css/crud.css" />
<script language="javascript">
	function upload() {
		document.form1.action = "../icetest/index.do";
		document.form1.submit();
	}

	function save() {
		document.form1.action = "../icetest/save.do";
		document.form1.submit();
	}
</script>
</head>
<body>
	<form name="form1" method="post" action="">
		<table align="center" width="100%">
			<tr>
				<td valign="top">
					<div class="page_titile">基本信息：</div>
					<table class="input_table" align="left" cellspacing="0" cellpadding="0" width="100%">
						<tr>
							<td class="input_titile_td" width="150">IP地址：</td>
							<td class="input_content_td"><input type="text" name="ipAddress" value="<c:out value='${ipAddress}' />" size="20" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" width="150">端口号：</td>
							<td class="input_content_td"><input type="text" name="port" value="<c:out value='${port}' />" size="20" /></td>
						</tr>
					</table> <br />
					<div class="page_titile">上下文：</div>
					<table class="input_table" align="center" cellspacing="0" cellpadding="0">
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="ctxParamName_1" value="<c:out value='${ctxParamName_1}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="ctxParamVals_1" value="<c:out value='${ctxParamVals_1}' />" size="50" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="ctxParamName_2" value="<c:out value='${ctxParamName_2}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="ctxParamVals_2" value="<c:out value='${ctxParamVals_2}' />" size="50" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="ctxParamName_3" value="<c:out value='${ctxParamName_3}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="ctxParamVals_3" value="<c:out value='${ctxParamVals_3}' />" size="50" /></td>
						</tr>
					</table> <br />
					<div class="page_titile">参数：</div>
					<table class="input_table" align="center" cellspacing="0" cellpadding="0">
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="paramName_1" value="<c:out value='${paramName_1}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="paramVal_1" value="<c:out value='${paramVal_1}' />" size="50" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="paramName_2" value="<c:out value='${paramName_2}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="paramVal_2" value="<c:out value='${paramVal_2}' />" size="50" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="paramName_3" value="<c:out value='${paramName_3}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="paramVal_3" value="<c:out value='${paramVal_3}' />" size="50" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="paramName_4" value="<c:out value='${paramName_4}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="paramVal_4" value="<c:out value='${paramVal_4}' />" size="50" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="paramName_5" value="<c:out value='${paramName_5}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="paramVal_5" value="<c:out value='${paramVal_5}' />" size="50" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="paramName_6" value="<c:out value='${paramName_6}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="paramVal_6" value="<c:out value='${paramVal_6}' />" size="50" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="paramName_7" value="<c:out value='${paramName_7}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="paramVal_7" value="<c:out value='${paramVal_7}' />" size="50" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="paramName_8" value="<c:out value='${paramName_8}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="paramVal_8" value="<c:out value='${paramVal_8}' />" size="50" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="paramName_9" value="<c:out value='${paramName_9}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="paramVal_9" value="<c:out value='${paramVal_9}' />" size="50" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="paramName_10" value="<c:out value='${paramName_10}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="paramVal_10" value="<c:out value='${paramVal_10}' />" size="50" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="paramName_11" value="<c:out value='${paramName_11}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="paramVal_11" value="<c:out value='${paramVal_11}' />" size="50" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="paramName_12" value="<c:out value='${paramName_12}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="paramVal_12" value="<c:out value='${paramVal_12}' />" size="50" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="paramName_13" value="<c:out value='${paramName_13}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="paramVal_13" value="<c:out value='${paramVal_13}' />" size="50" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="paramName_14" value="<c:out value='${paramName_14}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="paramVal_14" value="<c:out value='${paramVal_14}' />" size="50" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="paramName_15" value="<c:out value='${paramName_15}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="paramVal_15" value="<c:out value='${paramVal_15}' />" size="50" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="paramName_16" value="<c:out value='${paramName_16}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="paramVal_16" value="<c:out value='${paramVal_16}' />" size="50" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="paramName_17" value="<c:out value='${paramName_17}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="paramVal_17" value="<c:out value='${paramVal_17}' />" size="50" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="paramName_18" value="<c:out value='${paramName_18}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="paramVal_18" value="<c:out value='${paramVal_18}' />" size="50" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="paramName_19" value="<c:out value='${paramName_19}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="paramVal_19" value="<c:out value='${paramVal_19}' />" size="50" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="paramName_20" value="<c:out value='${paramName_20}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="paramVal_20" value="<c:out value='${paramVal_20}' />" size="50" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="paramName_21" value="<c:out value='${paramName_21}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="paramVal_21" value="<c:out value='${paramVal_21}' />" size="50" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="paramName_22" value="<c:out value='${paramName_22}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="paramVal_22" value="<c:out value='${paramVal_22}' />" size="50" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="paramName_23" value="<c:out value='${paramName_23}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="paramVal_23" value="<c:out value='${paramVal_23}' />" size="50" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="paramName_24" value="<c:out value='${paramName_24}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="paramVal_24" value="<c:out value='${paramVal_24}' />" size="50" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" width="150"><input type="text" name="paramName_25" value="<c:out value='${paramName_25}' />" /></td>
							<td class="input_content_td">=</td>
							<td class="input_content_td"><input type="text" name="paramVal_25" value="<c:out value='${paramVal_25}' />" size="50" /></td>
						</tr>
					</table>

				</td>
				<td width="20"></td>
				<td valign="top">
					<div class="page_titile">执行结果：</div>
					<table class="input_table" align="right" cellspacing="0" cellpadding="0" width="100%">
						<tr>
							<td class="input_content_td" align="left"><input type="submit" value="执行" onclick="upload()" /></td>
						</tr>
						<tr>
							<td class="input_content_td" align="left">结果： <br /> <textarea rows="20" cols="80"><c:out value='${iceResponse}' /></textarea></td>
						</tr>
					</table> 
					
					<br /><br /><br />
					<div class="page_titile">保存到测试用例：</div>
					<table class="input_table" align="right" cellspacing="0" cellpadding="0" width="100%">
						<tr>
							<td class="input_titile_td" width="150">用例名称</td>
							<td class="input_content_td" align="left"><input type="text" name="name" value="<c:out value='${name}' />" size="50" /></td>
						</tr>
						<tr>
							<td class="input_titile_td" colspan="2"><input type="submit" value="保存" onclick="save()" /></td>
						</tr>

					</table>
				</td>
			</tr>
		</table>

	</form>
</body>
</html>
